<template>
  <div class="dialog-content">
    <div class="dialog-header">
      <div class="dialog-title">
        xxxxx
        <template v-if="title">{{ title }}</template>
        <template v-if="$slots.title">
          <slot name="title"></slot>
        </template>
      </div>
      <div class="dialog-tools"></div>
    </div>
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: 'PDialog',
  props: ['title'],
  mounted() {

  },
  methods: {
    mouseup(e){},
    mousemove(e){},
    mousedown(e){}
  },
  unmounted() {
    window.removeEventListener('mouseup', this.mouseup);
    window.removeEventListener('mousemove', this.mousemove);
  }
}
</script>
<style lang="scss" scoped>
.dialog-content {
  background-color: #fff;
  border-radius: 5px;
  position: fixed;
  width: 500px;
  height: 300px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  .dialog-header {
    height: 30px;
    display: flex;
    padding: 0 20px;
    justify-content: space-between;
    line-height: 1;
    align-items: center;
    border-bottom: 1px solid #eee;
  }
}
</style>